<?php

namespace app\news\controller;

use app\common\controller\Frontend;
use app\common\library\Token;

class Index extends Frontend
{
    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function _initialize()
    {
        parent::_initialize();
    }

    public function index()
    {
        echo $this->request->param('callback').'({"newslist":[{"id":"15","title":"Gznetceo重磅推出强大的FormBuilder(表单生成器)功能","content":"Gznetceo重磅推出强大的FormBuilder(表单生成器)功能","url":"https:\/\/forum.baidu.com\/thread\/5567","createtime":"1530704604","updatetime":"1530704604","weigh":"15","status":"normal","status_text":"正常"},{"id":"5","title":"提示“未知的数据格式或网络错误”时该如何排查错误？","content":"<p>提示“未知的数据格式或网络错误”时该如何排查错误？<br><\/p>","url":"http:\/\/forum.baidu.com\/d\/56","createtime":"1505395088","updatetime":"1505395088","weigh":"5","status":"normal","status_text":"正常"}],"new":10,"url":"http:\/\/www.baidu.com?ref=news"});';
    }
     public function version()
    {
        echo $this->request->param('callback').'();';
    }
 public function addon()
    {

        echo $this->request->param('callback').'({"total":50,"rows":[{"id":"55","user_id":"1","category_id":"14","name":"command","title":"在线命令","intro":"在线执行Gznetceo控制台命令","description":"在线执行Gznetceo中的一键生成CRUD、一键生成菜单、一键生成文档","image":"https:\/\/cdn.baidu.com\/uploads\/addons\/command.png","screenshots":["https:\/\/cdn.baidu.com\/uploads\/20180505\/2f06461d35d29bdc9e43fe62075260df.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/fefe70b36cb26625bf31bcb2500e8c08.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/2a614841395ba31f6c82b548ac6bee86.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/2ac65dbeb9e8c584d3777f6b97b478df.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/3696b58c9c045a649da853beb268a532.png"],"donateimage":"https:\/\/cdn.baidu.com\/uploads\/donate\/karson.png","bgtext":"command","author":"Karson","url":"https:\/\/www.baidu.com\/store\/command.html","demourl":"","adminurl":"","wxappimage":"","qq":"171878601","score":"5.0","version":"1.0.4","price":"0.00","flag":["recommend"],"likes":"114","downloads":"11487","require":">= 1.0.0.20180314_beta","createtime":"1521020510","updatetime":"1535767186","releasetime":"1522166400","releaselist":[{"version":"1.0.4","require":">= 1.0.0.20180417_beta","releasetime":"1534987106","intro":"新增执行成功后刷新菜单"},{"version":"1.0.3","require":">= 1.0.0.20180417_beta","releasetime":"1525576077","intro":"修复命令执行成功仍提示错误的BUG"},{"version":"1.0.2","require":">= 1.0.0.20180314_beta","releasetime":"1522166400","intro":"修复启用启用的BUG"},{"version":"1.0.1","require":">= 1.0.0.20180314_beta","releasetime":"1521084351","intro":"修复未创建数据表的BUG"},{"version":"1.0.0","require":">= 1.0.0.20180314_beta","releasetime":"1521020746","intro":"一键生成CRUD、菜单、API文档"}]},{"id":"8","user_id":"1","category_id":"14","name":"example","title":"开发示例","intro":"Gznetceo后台开发示例","description":"包含Bootstrap-table示例、多表示例、多模型、模板示例、窗口切换、彩色角标等示例","image":"https:\/\/cdn.baidu.com\/uploads\/addons\/example.png","screenshots":["https:\/\/cdn.baidu.com\/uploads\/20180505\/5c5899428da2e747af77d5037bfa1514.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/490b5e0ed442c326340f715eac0417a6.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/41ebffaca42214ab86b4e73e2b7f5f8c.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/9f164168d020a1b295c16585c61de09d.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/50eac39277a895f54bb05a7823d692e8.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/252a94e615c4cba94dd76a3bcf80464d.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/0b2dade8a659e27afa7e83f5dc53f06e.png","https:\/\/cdn.baidu.com\/uploads\/20180505\/d1d60a9392c1c8015bbee2e892d9a0e0.png"],"donateimage":"https:\/\/cdn.baidu.com\/uploads\/donate\/karson.png","bgtext":"example","author":"Karson","url":"https:\/\/www.baidu.com\/store\/example.html","demourl":"https:\/\/demo.baidu.com\/example\/","adminurl":"https:\/\/demo.baidu.com\/admin\/example\/bootstraptable?ref=addtabs","wxappimage":"","qq":"171878601","score":"5.0","version":"1.0.7","price":"0.00","flag":["recommend"],"likes":"206","downloads":"11920","require":">= 1.0.0","createtime":"1500000000","updatetime":"1535767184","releasetime":"1520492712","releaselist":[{"version":"1.0.7","require":">= 1.0.0.20180417_beta","releasetime":"1525576155","intro":"优化表格完整示例"},{"version":"1.0.0","require":">= 1.0.0","releasetime":"1525394354","intro":"Gznetceo后台开发示例"},{"version":"1.0.3","require":">= 1.0.0","releasetime":"1524826438","intro":"Gznetceo后台开发示例"},{"version":"1.0.2","require":">= 1.0.0","releasetime":"1524825610","intro":"Gznetceo后台开发示例"},{"version":"1.0.1","require":">= 1.0.0","releasetime":"1524793927","intro":"Gznetceo后台开发示例"},{"version":"1.0.6","require":">= 1.0.0.20180406_beta","releasetime":"1523028230","intro":"新增自定义搜索示例"},{"version":"1.0.5","require":">= 1.0.0.20180308_beta","releasetime":"1520492526","intro":"新增插件前台示例"},{"version":"1.0.4","require":">= 1.0.0.20180222_beta","releasetime":"1519291860","intro":"新增插件的禁用启用方法"}]}],"category":[{"id":"19","name":"完整应用"},{"id":"14","name":"开发测试"},{"id":"16","name":"编辑器"},{"id":"17","name":"云储存"},{"id":"18","name":"短信验证"},{"id":"15","name":"接口整合"},{"id":"21","name":"辅助增强"}]});';
    }
    public function discussion(){
        echo  $this->request->param('callback').'({"discussionlist":[{"tid":"6605","posts":"2","create_date":"1535770276","last_date":"1535770738","url":"#thread\/6605","title":"关闭调试模式之后，在fast.js自定义的方法不能用"}]});';
    }

}
